#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int count = (a == 6) + (b == 6) + (c == 6); // 计算6的数量
  cout << (count == 0 ? 0 : count == 1 ? 10 : count == 2 ? 100 : 1000) << endl; // 输出结果

  return 0;
}